inserting or updating values into null textboxes [closed]

Posted by tanya on Programmers See other posts from Programmers or by tanya
Published on 2011-06-22T18:03:19Z Indexed on 2011/06/23 0:32 UTC
Read the original article Hit count: 213

Filed under:
|

this is my sql table structure

create table cottonpurchase

(

slipNo int null,

purchasedate datetime,

farmercode int ,

farmername varchar (100),

villagename varchar (100),

basicprice int null,

premium int null,

totalamountpaid int null,

weight int null,

totalamountbasic int null,

totalamountpremium int null,

Yeildestimates int null



)

I want to fill in the null values in my sql with actual values and not leave them null but I want to do that from my winforms app form!

But if I do that it just adds a new record when what I want is for it to update the record which has, for example, farmercode = 2, farmername = blaah, and so on.

I also want to enter this in the same records as in farmercode = 2 and the corresponding corresponding basic price = ... , everytime i do it it ends up making a new record and not in the existing one.

© Programmers or respective owner

Related posts about c#

Related posts about sql